from wtforms_tornado import Form
from wtforms.fields import IntegerField
from wtforms.fields import StringField
from wtforms.validators import DataRequired as DR


class GetUserForm(Form):
    delay = IntegerField()


class GetStoreForm(Form):
    delay = IntegerField()


class UserListForm(Form):
    # DataRequired必填
    page = IntegerField(validators=[DR()])
    limit = IntegerField(validators=[DR()])
    name = StringField()
    account = StringField()
    email = StringField()
    user_id = IntegerField()
    data_status = IntegerField()
    delay = IntegerField()


class AddUserForm(Form):
    account = StringField(validators=[DR()])
    password = StringField(validators=[DR()])
    name = StringField(validators=[DR()])
    email = StringField(validators=[DR()])
    phone_number = StringField(validators=[DR()])


